package com.genghis.ptas.scorm.dao;

import com.genghis.core.page.entity.Page;
import com.genghis.core.page.entity.PageParameter;
import com.genghis.ptas.scorm.entity.NodesInfo;
import com.genghis.ptas.scorm.entity.SCOInfo;
import com.genghis.ptas.scorm.entity.ScormInfo;
import com.genghis.ptas.scorm.entity.UserCourseInfo;
import com.genghis.ptas.system.entity.DictDefine;
import com.genghis.ptas.system.entity.DictValues;

import java.util.List;

/**
 * 字典dao接口
 *
 * @author tiangc
 * @version 1.0.1
 */

public interface ScormDao {

    int addScorm(ScormInfo scormInfo);

    int addSCOInfo(SCOInfo scoInfo);

    int addNodesInfo(NodesInfo nodesInfo);

    ScormInfo findScormInfoById(int id);

    List<NodesInfo> listAllCourseByScormId(int scormId);

    List<ScormInfo> findScormInfoPageList();

    int delCourse(int id);

    void updateNodeInfoByScoId(NodesInfo nodesInfo);

    SCOInfo getSCOInfoByNodeIdAndStuId(SCOInfo scoInfo);

    void updateSCOInfoByNodeIdAndStuId(SCOInfo scoInfo);

    Page<ScormInfo> findScormInfoPage(PageParameter pageParameter, ScormInfo scormInfo, int userId);

    Page<ScormInfo> findOnlinePageList(PageParameter pageParameter, ScormInfo scormInfo, int userId);

    Page<ScormInfo> findCoursePageListByUserId(PageParameter pageParameter, ScormInfo scormInfo, int userId);

    Page<ScormInfo> findCourseInfoPageList(PageParameter pageParameter, ScormInfo scormInfo,  int userId);

    void registScorm(ScormInfo scormInfo);

    int delCourseInfo(int id);

    int addUserCourseInfo(UserCourseInfo userCourseInfo);

    boolean isRegistScorm(UserCourseInfo userCourseInfo);

    List<ScormInfo> listAllScormByUploadTime();

    List<ScormInfo> listAllScormByRegistNum();

    List<ScormInfo> listAllScormByAvgScore();

    List<ScormInfo> listAllScormByCourseType(int courseType);

}